import request from "@/utils/request";

export default  {
    getUserList: (params) => {
        return request({
            url: '/user/getUserList',
            method: 'get',
            params
        })
    },
    getTeacherList: () => {
        return request({
            url: '/user/getTeacherList',
            method: 'get',
        })
    },
    add: (params) => {
        return request({
            url: '/user/add',
            method: 'post',
            data: params
        })
    },
    addCourse: (courseId, userId) => {
        return request({
            url: `/user/addCourse/${courseId}/${userId}`,
            method: 'put'
        })
    },
    deselect: (courseId, userId) => {
        return request({
            url: `/user/deselect/${courseId}/${userId}`,
            method: 'put'
        })
    },
    update: (params) => {
        return request({
            url: '/user/update',
            method: 'put',
            data: params
        })
    },
    remove: (id) => {
        return request({
            url: '/user/delete/' + id,
            method: 'delete',
        })
    }
}


